package com.treasure.mall.biz.entity.banner;

import com.treasure.mall.biz.entity.Base2PO;
import com.treasure.mall.zbq.common.ienum.banner.BannerType;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;

/**
 * @author guomw
 * @version 1.0
 * @date 2019/10/26 16:15
 */
@Setter
@Getter
@Entity
@Table(name = "spot_banner")
@Cacheable(false)
@NoArgsConstructor
public class BannerPO extends Base2PO {

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;
    /**
     * 图片地址
     */
    @Column(name = "url")
    private String url;
    /**
     * 跳转链接
     */
    @Column(name = "link")
    private String link;
    /**
     * 标题
     */
    @Column(name = "title")
    private String title;
    /**
     * banner 类型
     * {@link BannerType}
     */
    @Column(name = "banner_type")
    private BannerType bannerType;

    /**
     * 排序字段，升序排列
     */
    @Column(name = "sort_num")
    private int sortNum;

}
